package com.token.sysflow.service;
import com.alibaba.fastjson.JSONArray;
import com.token.base.Pl;
import com.token.sql.IntegrateSql;

/**
 * @author chenjianxiong 2020/5/7
 */
public class PostSelectTree extends SelectTree {
    /**
     * @param iSql
     */
    public PostSelectTree(IntegrateSql iSql) {
        super(iSql);
    }

    /**
     * @return
     * @throws Exception
     */
    public JSONArray readData() throws Exception {
        prepareSql.setPrepare("select PostNumber as id,'root' as pid,PostName as name from F_Sys_Post where SysId=?");
        prepareSql.setPstValue(1, Pl.getSysId());
        doWhileToJson(prepareSql.executeQuery(), this.getCheckable(), true);

        return array;
    }
}
